/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package br.org.espmessenger.cliente.telas;

import br.org.espmessenger.modelo.Status;
import javax.swing.DefaultComboBoxModel;

/**
 *
 * @author berardo
 */
class StatusModel extends DefaultComboBoxModel {
    private Status status;

    public StatusModel() {
    }

    @Override
    public Status getElementAt(int index) {
        return Status.values()[index];
    }

    @Override
    public Object getSelectedItem() {
        return status;
    }

    @Override
    public int getSize() {
        return Status.values().length;
    }

    @Override
    public void setSelectedItem(Object anObject) {
        status = (Status) anObject;
    }

}
